import axios from './axios'
import qs from 'qs'

const userManage = '/userManage'

const registerUser = async (data) => {
  const rst = await axios.get(userManage + '/registerUser?' + qs.stringify(data))
  return rst.data
}

const update = async (data) => {
  const rst = await axios.get(userManage + '/update?' + qs.stringify(data))
  return rst.data
}

const select = async (data) => {
  const rst = await axios.get(userManage + '/select?' + qs.stringify(data))
  return rst.data
}

const selectByKey = async (data) => {
  const rst = await axios.get(userManage + '/selectByKey?' + qs.stringify(data))
  return rst.data
}

const deleteUser = async (data) => {
  const rst = await axios.get(userManage + '/deleteUser?' + qs.stringify(data))
  return rst.data
}

export {
  registerUser,
  update,
  select,
  selectByKey,
  deleteUser
}
